Skip to main content

Texture2D Class

Description:

  A record represents Texture2D class object.

__call

Type: Metamethod.

Description:

  Creates a texture object from the given file.

Signature:

metamethod __call: function(self: Texture2DClass, filename: string): Texture2D | nil

Parameters:

ParameterTypeDescription
filenamestringThe file name of the texture.

Returns:

Return TypeDescription
Texture2DThe texture object.